<?php
/**
 * Created by PhpStorm.
 * User: z
 * Date: 14-8-8
 * Time: 下午8:59
 */
class Task_warningtmp extends Minion_Task
{
    protected $_options = array(
        'type'=>NULL,
    );

    public function _execute(array $params)
    {
        /**
         * 默认是半小时任务
         */
        $url = "count/countwarning";

        /**
         * 如果设置了，则是天任务
         * 24小时运行一次
         */
        if(isset($params['type']) and $params['type']==24)
        {
            $url = "count/flushwarning";
        }

        Request::factory($url)->execute();

    }
}